{% load i18n static thumbnail %}

<div class="row">
    <div class="col-md-3 col-lg-3">
        {% if politician.image %}
            <img alt="{{ politician.first_name }} {{ politician.last_name }}" src="{{politician.image|thumbnail_url:'medium'}}" class="img-thumbnail img-responsive">
        {% else %}
            <img class="img-thumbnail img-responsive" width="310px" src="{% static 'images/placeholder.svg' %}">
        {% endif %}
    </div>
    <div class="col-md-5 col-lg-5 details">
        <h2 class="mt0">{{ politician.first_name }} {{ politician.last_name }}</h2>

        <div class="row">
            <div class="col-md-6"><strong>{% trans 'state' %}</strong></div>
            <div class="col-md-6">{{politician.state_name}}</div>
        </div>

        <div class="row">
            <div class="col-md-6"><strong>{% trans 'party' %}</strong></div>
            <div class="col-md-6">{{politician.party_name}}</div>
        </div>

        <div class="row">
            <div class="col-md-12"><strong>{% trans 'past_contributions' %}:</strong> {{politician.past_contributions}}</div>
        </div>

        <div class="row">
            <div class="col-md-12"><strong>{% trans 'future_plans' %}:</strong> {{politician.future_plans}}</div>
        </div>

        <div class="row">
            <div class="col-md-6"><strong>{% trans 'is_member_of_parliament' %}</strong></div>
            <div class="col-md-6">{% if politician.is_member_of_parliament %}{% trans 'yes' %}{%else%}{% trans 'no' %}{%endif%}</div>
        </div>

        <div class="row">
            <div class="col-md-6"><label> {% trans 'show_own_spider' %}</label></div>
            <div class="col-md-6">
                {% if 'statistics' in request.COOKIES and request.COOKIES.statistics != '{}' %}
                <input type="checkbox" id="show_citizen" checked>
                {% else %}
                <a href="{% url 'compare' %}">{% trans 'add_own_opinion' %}</a>
                <input type="checkbox" id="show_citizen" style="display:none">
                {% endif %}
            </div>
        </div>

        {% if links %}
        <strong>{% trans 'links' %}</strong>
        <hr>
        <div class="col-md-6">
            {% for link in links %}
                <p>
                    <img class="img-circle" src="{{link.type.icon|thumbnail_url:'icon'}}">
                    <a href="{{link.url}}">{{link.type.name}}</a>
                </p>
            {%endfor%}
        </div>
        {% endif %}
    </div>
    <div
     class="col-md-4 col-lg-4 spider-container"
     id="chart"
     data-url="{% url 'politician_statistic_spider' politician_id=politician.id %}?compare"
    ></div>
</div>
